#include <QCoreApplication>

#include "core/coredefine.h"
#include "corectrl.h"
#include "logwriter.h"

int main(int argc, char *argv[])
{
    quint16 port = PORT;
    for (int i = 0; i < argc; ++i)
    {
        QString word = argv[i];
        if (word.startsWith("-port"))
        {
            port = word.mid(5).toUShort();
            break;
        }
    }
    writeLog("123");
    QCoreApplication a(argc, argv);
    CoreCtrl* core = CoreCtrl::get_instance();
    core->start(port);
    return a.exec();
}
